package com.hongshu.idle.controller.sys;


import com.hongshu.common.core.enums.Result;
import com.hongshu.common.core.validator.myVaildator.noLogin.NoLoginIntercept;
import com.hongshu.common.core.web.controller.BaseController;
import com.hongshu.idle.service.sys.ISysSystemConfigService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 系统配置
 *
 * @author: hongshu
 */
@Tag(name = "系统配置相关接口", description = "系统配置相关接口")
@RestController
@RequestMapping("/config")
@Slf4j
public class SysSystemConfigController extends BaseController {

    @Autowired
    private ISysSystemConfigService systemConfigService;


    @NoLoginIntercept
    @Operation(summary = "获取系统配置", description = "获取系统配置")
    @GetMapping("/systemConfig")
    public Result<?> getSystemConfig() {
        return Result.ok(systemConfigService.getSystemConfig());
    }

    @NoLoginIntercept
    @Operation(summary = "获取支付宝配置", description = "获取支付宝配置")
    @GetMapping("/alipayConfig")
    public Result<?> getAlipayConfig() {
        return Result.ok(systemConfigService.getAlipayConfig());
    }

}

